package com.cloud.annotation.springAnnotation.postConstruct;

import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

@Component
public class PostConstructTest {
    Map map = new ConcurrentHashMap<>();

    /**
     * 启动前执行，相当于init-method
     */
    @PostConstruct
    public void init() {
        System.out.println("init");
    }
}
